<template>
  <view v-if="list && list.length" class="planned-payment-info">
    <view class="ppi-card-box" v-for="item in list" :key="item.id">
      <d-card>
        <d-forms disabled label-width="160rpx">
          <d-forms-item label="回款批次" :input="item?.paymentBatch"></d-forms-item>
          <d-forms-item label="金额(元)" :type="DFormInputType.AMOUNT" :input="item?.amount"></d-forms-item>
          <d-forms-item label="支付方式" :type="DFormInputType.DICT" :input="item.paymentMode" :dict-type="PM_DICT_TYPE.PAYMENT_MODE"></d-forms-item>
          <d-forms-item label="回款日期" :type="DFormInputType.DATE" :input="item.paymentTime" format="yyyy-MM-dd"></d-forms-item>
          <d-forms-item label="开户银行" :input="item?.accountsBank"></d-forms-item>
          <d-forms-item label="账户名称" :input="item?.accountName"></d-forms-item>
          <d-forms-item label="回款账号" :input="item?.account"></d-forms-item>
          <d-forms-item label="回款条件" :input="item?.terms"></d-forms-item>
          <d-forms-item label="备注" :input="item?.remarks"></d-forms-item>
        </d-forms>
      </d-card>
    </view>
  </view>
  <view v-else>
    <d-card>暂无</d-card>
  </view>
</template>

<script setup lang="ts">
import {getDictDataLabel, PM_DICT_TYPE} from "@/utils/pmDict";
import {formatDate} from "@dcloudio/uni-ui/lib/uni-dateformat/date-format";
import {DFormInputType} from "@/utils/enum";

defineOptions({name: 'PlannedPaymentInfo'})

const props = defineProps({
  list: {
    type: Array<PlannedPaymentForm>,
    default: () => [],
  }
})
</script>

<style scoped lang="scss">
.ppi-card-box {
  margin-bottom: 20rpx;
}
</style>
